package com.neu.icloud.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neu.icloud.entity.Factory;
import com.neu.icloud.service.FactoryService;

@RestController
@RequestMapping("/FactoryController")
public class FactoryController {

	@Autowired
	private FactoryService factoryService;
	
	@RequestMapping("/getAllFactory")
	public List<Factory> getAllFactory(Factory factory) {
		return factoryService.getAllFactory(factory);
	}
	
	@RequestMapping("/saveFactory")
	public int saveFactory(Factory factory) {
		return factoryService.saveFactory(factory);
	}
}
